<?php
class findLabelDepericarpingDanPolishing{
	private $label;
	private $db;
	
	function findLabelDepericarpingDanPolishing($db=NULL, $label=NULL){
		$this->label = $label;
		$this->db = $db;	
	}
	
	function response(){
		$q = "SELECT COUNT(*) FROM `caramel_operational`.`inv_depericarping_dan_polishing` WHERE `label_tandan`='".$this->label."'";
		$r = $this->db->get_var($q);
		if( $r > 0 )
			echo 'true';
		else
			echo 'false';
	}	
}

$label	= $_GET['label_tandan'];


// load database class handler
include_once '../config/db_config.php';
include '../library/ezsql/shared/ez_sql_core.php';
include '../library/ezsql/mysql/ez_sql_mysql.php';

// database handler
$db = new ezSQL_mysql($dbUser, $dbPass, $dbName, $dbHost);


$finder = new findLabelDepericarpingDanPolishing($db, $label);
$finder->response();
?>